#include<bits/stdc++.h>
using namespace std;
class Solution {
public:
	vector<int> singleNumber(vector<int>& nums) {
		int AoxrB = 0;
		for (int i : nums) AoxrB ^= i;
		int lsb = AoxrB == INT_MIN ? AoxrB : AoxrB & (-AoxrB);
		int AorB = 0;
		for (int i : nums) {
			if (i & lsb)
				AorB ^= i;
		}
		return { AorB, AorB ^ AoxrB };
	}
};